<%-- 
    Document   : OrderChM
    Created on : Sep 27, 2010, 7:53:40 PM
    Author     : IYB
--%>

<%@page contentType="text/html" pageEncoding="UTF-8" import="java.sql.Date, java.util.ArrayList"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Home</title>
<link rel="shortcut icon" type="image/x-icon" href="includes/images/favicon.png" />
<link rel="stylesheet" type="text/css" media="screen" href="includes/css/resetter.css" title="resetter" />
<link rel="stylesheet" type="text/css" media="screen" href="includes/css/style.css" />
<script type="text/javascript" src="includes/js/auto-width.js"></script>
</head>
<body>
	<div id="wrap">
		<div id="header">
			<div id="top-logo"><img src="includes/images/transmit.png" style="height:70px"/></div>
			<div id="top-name">SMARTravel</div>
			<div id="login-form">
				<input type="text" value="username"/> <input type="password" value="password"/> <button>Login</button><br/>
				<a href="lostpassword.html">lost password?</a>, or <a href="register.html">register</a>
			</div>
			<div style="clear:both;margin-bottom:-20px"></div>
		</div>
		<div id="top-menu">
			<ul>
				<li><a href="index.jsp">Home</a></li>
				<li><a href="ManageServices.jsp">Service</a></li>
				<li><a href="User.jsp">User</a></li>
				<li><a href="MyOrder.jsp">My Order</a></li>
				<li><a href="OrderList.jsp">Order List</a></li>
				<li><a href="PaymentConfirm.jsp">Payment Confirm</a></li><li><a href="PaymentNotice.jsp">Payment Notice</a></li>
				<li><a href="Resources.jsp">Resources</a></li>
				<li><a href="CustomizeInfo.jsp">Customize Info</a></li>
				<li><a href="UserManagement.jsp">User Management</a></li><li><a href="Statistics.jsp">Statistics</a></li>
				<li><a href="Contact.jsp">Contact</a></li>
			</ul>
		</div>
    	<div id="main">
			<div style="float:left; width:50%"><img src="includes/images/public-transport.jpg" style="width:400px"/></div>
			<div style="float:left; width:50%">

    <%
        Date tanggal_berangkat = (Date)request.getAttribute("tanggal_berangkat");
        Integer total_hari = (Integer)request.getAttribute("total_hari");
    %>
    <form action="PesanCharterServlet" method="post">
        <input type="hidden" name="command" value="2" />
    <table width="447" border="0">
        <tr>
            <td>Tanggal Keberangkatan :</td>
            <td>
                <input type="hidden" name="tanggal" value="<% out.print(tanggal_berangkat.getDate()); %>" />
                <input type="hidden" name="bulan" value="<% out.print(tanggal_berangkat.getMonth()); %>" />
                <input type="hidden" name="tahun" value="<% out.print(tanggal_berangkat.getYear()); %>" />
                <input type="text" name="tanggal_berangkat" value="<% out.print(tanggal_berangkat); %>" readonly />
            </td>
        </tr>
        <tr>
            <td>Jumlah hari sewa :</td>
            <td><input type="text" name="sewa" id="sewa" value="<% out.print(total_hari); %>" readonly /></td>
        </tr>
        <tr>
            <td>Nama Pemesan :</td>
            <td><input name="textfield3" type="text" id="textfield3" value="" /></td>
        </tr>
        
        <tr>
            <td>Mobil yang Disewa : </td>
                <td>
                    <select name="jumpMenu" id="jumpMenu">
                        <%
                        
                        ArrayList<Integer> mobil_tersedia_id = (ArrayList<Integer>)request.getAttribute("mobil_tersedia_id");
                        ArrayList<String> mobil_tersedia_name = (ArrayList<String>)request.getAttribute("mobil_tersedia_name");

                        for (int i=0; i<mobil_tersedia_id.size(); i++)
                        {
                            out.print("<option value=\""+mobil_tersedia_id.get(i)+"\">"+mobil_tersedia_name.get(i)+"</option>");
                        }
                        %>
                    </select>
                </td>
        </tr>
        <tr>
            <%

            int id_supir = (Integer)request.getAttribute("id_supir_tersedia");

            if (id_supir == -1)
            {
            %>
            <td colspan="2">
                <input type="hidden" name="id_supir" value="<% out.print(id_supir); %>" />
                Supir tidak tersedia pada rentang tanggal tersebut.
            </td>
            <%
            }
            else {
            %>

            <td>Menggunakan supir?</td>
            <td>
                <input type="hidden" name="id_supir" value="<% out.print(id_supir); %>" />
                <input type="radio" name="radio" id="1" value="1" />Yes
                <input type="radio" name="radio" id="2" value="2" />No
            </td>
            <% } %>
        </tr>
    </table>
    <input type="submit" name="chm" id="chm" value="Submit" />
  </form>
            </div>
        </div>
    </div>
    <div id="footer">
    </div>
</body>
</html>
